package com.ruoyi.production.service.impl.blade;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.blade.BladeApplyTemporary;
import com.ruoyi.production.mapper.blade.BladeApplyTemporaryMapper;
import com.ruoyi.production.service.blade.IBladeApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 刀片临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class BladeApplyTemporaryServiceImpl implements IBladeApplyTemporaryService
{
    @Autowired
    private BladeApplyTemporaryMapper bladeApplyTemporaryMapper;

    /**
     * 查询刀片临时申请
     *
     * @param bladeApplyTemporaryId 刀片临时申请ID
     * @return 刀片临时申请
     */
    @Override
    public BladeApplyTemporary selectBladeApplyTemporaryById(Long bladeApplyTemporaryId)
    {
        return bladeApplyTemporaryMapper.selectBladeApplyTemporaryById(bladeApplyTemporaryId);
    }

    /**
     * 查询刀片临时申请列表
     *
     * @param bladeApplyTemporary 刀片临时申请
     * @return 刀片临时申请
     */
    @Override
    public List<BladeApplyTemporary> selectBladeApplyTemporaryList(BladeApplyTemporary bladeApplyTemporary)
    {
        return bladeApplyTemporaryMapper.selectBladeApplyTemporaryList(bladeApplyTemporary);
    }

    /**
     * 新增刀片临时申请
     *
     * @param bladeApplyTemporary 刀片临时申请
     * @return 结果
     */
    @Override
    public int insertBladeApplyTemporary(BladeApplyTemporary bladeApplyTemporary)
    {











        bladeApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return bladeApplyTemporaryMapper.insertBladeApplyTemporary(bladeApplyTemporary);
    }

    /**
     * 修改刀片临时申请
     *
     * @param bladeApplyTemporary 刀片临时申请
     * @return 结果
     */
    @Override
    public int updateBladeApplyTemporary(BladeApplyTemporary bladeApplyTemporary)
    {
        bladeApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return bladeApplyTemporaryMapper.updateBladeApplyTemporary(bladeApplyTemporary);
    }

    /**
     * 批量删除刀片临时申请
     *
     * @param bladeApplyTemporaryIds 需要删除的刀片临时申请ID
     * @return 结果
     */
    @Override
    public int deleteBladeApplyTemporaryByIds(Long[] bladeApplyTemporaryIds)
    {
        return bladeApplyTemporaryMapper.deleteBladeApplyTemporaryByIds(bladeApplyTemporaryIds);
    }

    /**
     * 删除刀片临时申请信息
     *
     * @param bladeApplyTemporaryId 刀片临时申请ID
     * @return 结果
     */
    @Override
    public int deleteBladeApplyTemporaryById(Long bladeApplyTemporaryId)
    {
        return bladeApplyTemporaryMapper.deleteBladeApplyTemporaryById(bladeApplyTemporaryId);
    }
}
